<?php

namespace App\Services\UserFromInviteCode;

use App\Models\User;

class UserFromInviteCode
{
	protected $inviteCode;
	
	public function __construct($inviteCode)
	{
		$this->inviteCode = $inviteCode;
	}
	
	protected function user()
	{
		return User::where('invite_code', $this->inviteCode)->first();
	}
	
	public function get()
	{
		return $this->user();
	}
}
